-- GENERATED SPELL FOR [Undead Postman] --


function spell0_11142(pUnit, Event) --@Call of the Grave,n/a--
pUnit:FullCastSpellOnTarget(5137,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11142', 2000, 1)
end

function spell1_11142(pUnit, Event) --@Wailing Dead,Self--
pUnit:FullCastSpellOnTarget(7713,pUnit)
pUnit:RegisterEvent('Sorts_11142', 6315, 1)
end

function Sorts_11142(pUnit, Event)
local choix_sorts_11142 = math.random(0, 1)
if choix_sorts_11142 == 0 then
pUnit:RegisterEvent('spell0_11142', 1, 1)
end
if choix_sorts_11142 == 1 then
pUnit:RegisterEvent('spell1_11142', 1, 1)
end
end

function mob11142_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11142', math.random(1500, 3000), 1)
end

function mob11142_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11142_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11142_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11142, 1, 'mob11142_Action')
RegisterUnitEvent(11142, 2, 'mob11142_Leave')
RegisterUnitEvent(11142, 3, 'mob11142_Kill')
RegisterUnitEvent(11142, 4, 'mob11142_Die')
